﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using XProject.DataVisit.Factory;
using XProject.DataVisit.BLL;

public partial class Template_main : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.ContentType = "text/javascript";
        if(!string.IsNullOrEmpty(Request["path"]) )
        {
            string path = Server.UrlDecode(Request["path"]);
            Server.Transfer("~/" + path);
            
        }
        else if (Request["id"] != null)
        {
            //获取参数
            var id = Request["id"];
            var url = DaoFactory.BindAdvertisementDao.GetAdvertisementUrl(id);
            //context.Server.Transfer(url.Url);
            //var html = PublicFn.GetHTMLPage(Server.MapPath("../")+"/"+ url.Url);
            Server.Transfer("~/"+url.Url);
        }
    }
}